package com.ecode.annotation.core;

import com.ecode.annotation.EcodeDo;
import com.ecode.annotation.ErrorCode;

/**
 * @ClassName CodeDataPullBuilder
 * @Author mjlft
 * @Date 2021/10/4 11:17
 * @Version 1.0
 * @Description 错误码获取构建发服务
 */
public interface CodeDataPullBuilder {

    //根据不同数据配置策略拉取相应的错误码配置数据
    default String dataPull(ErrorCode errorCode){
        EcodeDo ecodeDo = EcodeDo.buildFromErrorCode(errorCode);
        return dataPull(ecodeDo);
    }
    String dataPull(EcodeDo ecodeDo);
}
